﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="9.aspx.cs" Inherits="BaseWeb.拖拽研究._8" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>拖动把手（handle）</title>
    <%--
    默认是整个元素都可以拖动，也可以指定元素的某个子元素作为拖动的handle，
    --%>

    <script src="../../js/jquery-1.7.min.js" type="text/javascript"></script>

    <script src="../../js/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div id="draggable" style="width: 200px; height: 200px; background-color: Green;">
            <p style="width: 40px; height: 40px; background-color: gray;">
                handle</p>
        </div>
    </div>
    </form>
</body>
</html>

<script>    $("#draggable").draggable({ handle: "p" });</script>

